JBoss Community Archive (Read Only)

Teiid Examples

Drools Component Integration

The Drools component integration is an example of integrating business rules with your data. This example demonstrates how a business rule can be triggered via a User Defined Function (UDF).

drools-integration quickstart

All the code discussed in this tutorial is available in the drools-integration quickstart.

See the README.md for directions to run the quick start.

The UDF (RulesUDF.java) is written to load one or more drools .drl file(s) that is defined as a property. An example is:

where: - value format is: POJO className:.drl file[,POJO className:.drl,…]

The format maps the POJO to the rule that will process it.

The caller to the UDF will call the following function method:

	public static Object performRuleOnData(final String className, final String returnMethodName, final Object returnIfNull, final Object... arguments) 
	...

where:

Other integration scenarios, such as using Teiid as a data integration engine under Drools or interacting with live knowledge base, are of course also possible.

JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-13 13:14:06 UTC, last content change 2015-02-13 19:29:30 UTC.